package com.swt.service.impl.W_impl;

import com.swt.dao.impl.W_impl.AdminDaoImpl;
import com.swt.domain.Admin;
import com.swt.service.W_service.AdminService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Resource
    private AdminDaoImpl adminDao;

    @Override
    public List<Admin> login(Admin admin) {
        return adminDao.login(admin);
    }

    @Override
    public boolean register(Admin admin) {
        return adminDao.register(admin);
    }

    @Override
    @Transactional
    public void add(Admin admin) {
        adminDao.add(admin);
    }

    @Override
    @Transactional
    public void editPassword(Admin admin) {
        adminDao.editPassword(admin);
    }
}
